<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>编辑广告</title>
	<hdjs />
	<css file='__PUBLIC__/Css/mod.base.css' />
</head>
<body>

	<form action="" method="post" enctype='multipart/form-data' class='hd-form'>

			<div class="hd-title-header">编辑广告</div>
			<div class="hd-menu-list">
				<ul>
					<li>
						<a href="{:U('Ad/index',array('aid'=>
							$_GET["aid"]))}" >
							广告列表
						</a>
					</li>
					<li class="active">
						<a href="javascript:;" >编辑广告</a>
					</li>
				</ul>
			</div>
			<div class="hd-title-header">
            编辑广告
        	</div>
			<table class='hd-table hd-table-form hd-form'>
				<tbody>
					<tr>
						<th class="hd-w100">广告位置</th>
						<td>
							<select name="position_psid" >
								<option value="0">请选择广告位置</option>
								<foreach name='position' item='v'>
									<option <if condition="$v['psid'] eq $field['position_psid']">selected='selected'</if>
									value="{$v.psid}">{$v.position_name} ({$v.width}×{$v.height})
								</option>
							</foreach>
						</select>
					</td>
				</tr>
				<tr>
					<th >广告名称</th>
					<td>
						<input type="text" name="name"  class='hd-w200' value="{$field['name']}"/>
					</td>
				</tr>

				<tr>
					<th>广告链接</th>
					<td>
						<textarea name="url" class='hd-w500 hd-h100'>{$field['url']}</textarea>
					</td>
				</tr>
				<tr>
					<th>排序</th>
					<td>
						<input name="sort" type="text" class='hd-w200' value="100" value="{$field['sort']}"/>
					</td>
				</tr>

				<tr>
					<th>审核</th>
					<td>
						<label >
							<input <if condition="$field['verifystate'] eq 1">checked="checked"</if>
						name="verifystate" type="radio"  value="1" /> 审核中
					</label>
					<label >
						<input <if condition="$field['verifystate'] eq 2">checked="checked"</if>
					name="verifystate" type="radio" value="2" /> 通过
				</label>
			</td>
		</tr>

		<tr>
			<th>图片</th>
			<td>
				<input type="file" name='pic'/>
				<br/>
				<img src="{$field.pic}" alt=""  width="100" />
			</td>
		</tr>

		<tr style="display:none">
			<th>(英)图片</th>
			<td>
				<input type="file" name='pic_en'/>
				<br/>
				<img src="{$field.pic_en}" alt=""  width="100" />
			</td>
		</tr>

	</tbody>
</table>

<div class="hd-position-bottom">
<input type="hidden" name="aid" value="{$Think.get.aid}" />
<input type="submit" class='hd-btn-primary hd-btn' value="编辑" />
<input type="button" class="hd-btn" onclick="location.href='{:U('Ad/index')}'" value="返回"/>
</div>

</form>

</body>
</html>